package com.yunxi.service.dubboService.impl.sys.bizToBaseData;

import com.yunxi.bizToBaseData.pojo.AttachReqVO;
import com.yunxi.bizToBaseData.pojo.AttachRespVO;
import com.yunxi.bizToBaseData.service.SToSAttachDubboService;
import com.yunxi.core.web.LoginInfo;
import com.yunxi.model.sys.SysAttach;
import com.yunxi.service.localService.sys.AttachService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public class SToSAttachDubboServiceImpl implements SToSAttachDubboService {

    @Autowired
    AttachService attachServiceImpl;

    @Transactional
    @Override
    public boolean save(AttachReqVO vo) {
        SysAttach sysAttach = new SysAttach();
        BeanUtils.copyProperties(vo,sysAttach);
        return attachServiceImpl.save(sysAttach);
    }

    @Override
    public void saveByAttachVoList(List<AttachReqVO> attachVOList, String vip_apply, String applyId, LoginInfo loginInfo) {
        attachServiceImpl.saveByAttachReqVoList(attachVOList,vip_apply,applyId,loginInfo);
    }
}
